﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.BusinessObjects.Data;

namespace Blazing.BusinessObjects.Cms
{
    public class UrlRedirect : DataObject<UrlRedirect>
    {
        public virtual int ID
        {
            get { return GetValue<int>("ID"); }
            set
            {
                BeginEdit();
                SetValue("ID", value);
            }
        }

        public virtual int Order
        {
            get { return GetValue<int>("Order"); }
            set
            {
                BeginEdit();
                SetValue("Order", value);
            }
        }

        public virtual string MatchPattern
        {
            get { return GetValue<string>("MatchPattern"); }
            set
            {
                BeginEdit();
                SetValue("MatchPattern", value);
            }
        }

        public virtual Site Site { get; set; }

        public virtual string DestinationResult
        {
            get { return GetValue<string>("DestinationResult"); }
            set
            {
                BeginEdit();
                SetValue("DestinationResult", value);
            }
        }

        public virtual int RedirectStatusCode
        {
            get { return GetValue<int>("RedirectStatusCode"); }
            set
            {
                BeginEdit();
                SetValue("RedirectStatusCode", value);
            }
        }

        public virtual bool IsActive
        {
            get { return GetValue<bool>("IsActive"); }
            set
            {
                BeginEdit();
                SetValue("IsActive", value);
            }
        }

        public virtual bool IsRewrite
        {
            get { return GetValue<bool>("IsRewrite"); }
            set
            {
                BeginEdit();
                SetValue("IsRewrite", value);
            }
        }

        public virtual bool IsHostAppendedAsQueryParam
        {
            get { return GetValue<bool>("IsHostAppendedAsQueryParam"); }
            set
            {
                BeginEdit();
                SetValue("IsHostAppendedAsQueryParam", value);
            }
        }

        public virtual DateTime RowStamp
        {
            get { return GetValue<DateTime>("RowStamp"); }
            set
            {
                SetValue("RowStamp", value);
            }
        }
    }
}
